/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.view.render;

import java.awt.Graphics;

import chunmap.data.feature.Feature;
import chunmap.view.View;

/**
 * 地图符号，例如箭头
 * @author chunquedong
 * 
 */
public abstract class Symbol {

	private boolean isValid=true;
	
	protected abstract void draw(Graphics g, Feature f, View view);
	
	public void tryDraw(Graphics g, Feature f, View view){
		if(isValid){
			draw(g,f,view);
		}
	}

	public boolean isValid() {
		return isValid;
	}

	public void setValid(boolean isValid) {
		this.isValid = isValid;
	}
}